﻿using System.Collections.Generic;

namespace Kobets.Automation.Chimera.Common
{
    /// <summary>
    /// Describes an Agent
    /// </summary>
    public class Agent
    {
        /// <summary>
        /// Name of the agent, usually equals machine name
        /// </summary>
        public string Name { get; set; }
        
        /// <summary>
        /// FQDN
        /// </summary>
        public string NetworkName { get; set; }
        
        /// <summary>
        /// Status (Idle, Running, Disconnected)
        /// </summary>
        public Enums.AgentStatus Status { get; set; }

        /// <summary>
        /// Associated controller
        /// </summary>
        public string Controller { get; set; }

        public override bool Equals(object obj)
        {
            return Name == ((Agent)obj).Name;
        }

        public override int GetHashCode()
        {
            return Name.GetHashCode();
        }

        public override string ToString()
        {
            return "Name: " + Name + "; Network Name: " + NetworkName + "; Status: " + Status;
        }
    }
}
